<?php

create_json();
// print json_encode($json);

function create_json()
{
    $rows = array();
    $a = array();
    for ($i=0; $i < 10;$i++) {
        // $a["name"]   = rand_string(5);
        // $a["id"] = rand(10, 99);
        // $a["mm"] = rand_string(4);
        $rows[] = rand_string(5);
    }
    print json_encode($rows);
    // return $rows;
}


function rand_string( $length ) {
    $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
    $size = strlen( $chars );
    for( $i = 0; $i < $length; $i++ ) {
        $str .= $chars[ rand( 0, $size - 1 ) ];
    }
    return $str;
}
?>
